import Vue from "vue"
import VueRouter from "vue-router"

// 导入页面组件
const Home = () => import(
    /* webpackPrefetch: true */
    '@/views/Home/index.vue'
)
const About = () => import(
    /* webpackPreload: true */
    '@/views/About/index.vue'
)

Vue.use(VueRouter)

const router = new VueRouter({
    routes: [
        { path: '/', component: Home },
        { path: '/about', component: About },
    ]
})

export default router